package com.yds.dubbo.basic.spring.xml;

import com.yds.dubbo.basic.spring.xml.service.HelloService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.IOException;

/**
 * @author liuhongzhen
 * @date 2023/3/23 18:24
 */
public class ConsumerBootstrap {
    public static void main(String[] args) throws IOException {

        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/dubbo-demo-consumer.xml");
        context.start();
        HelloService greetingsService = (HelloService) context.getBean("greetingsService");

        String message = greetingsService.sayHi("dubbo");
        System.out.println("Receive result ======> " + message);
        System.in.read();
        System.exit(0);
    }
}
